﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DTO
{
    public class TheKhachHang
    {
        private int maKh;

        public int MaKh
        {
            get { return maKh; }
            set { maKh = value; }
        }
        private string tenKh;

        public string TenKh
        {
            get { return tenKh; }
            set { tenKh = value; }
        }
        private string cMND;

        public string CMND
        {
            get { return cMND; }
            set { cMND = value; }
        }

        private string diachi;

        public string Diachi
        {
            get { return diachi; }
            set { diachi = value; }
        }
        private string sodienthoai;

        public string Sodienthoai
        {
            get { return sodienthoai; }
            set { sodienthoai = value; }
        }

        private int diemtichluy;

        public int Diemtichluy
        {
            get { return diemtichluy; }
            set { diemtichluy = value; }
        }
        private int phantramgiam;

        public int Phantramgiam
        {
            get { return phantramgiam; }
            set { phantramgiam = value; }
        }

        public int TinhPhanTramGiam()
        {
            int kq = 0;
            if (diemtichluy >= 20 && diemtichluy < 100)
                kq= 5;
            if (diemtichluy >= 100 && diemtichluy < 200)
                kq= 10;
            if (diemtichluy >= 200)
                kq = 15;
            return kq;
        }

        public int TinhDiemTichLuy(float tongtien)
        {
            int kq = 0;
            if (tongtien >= 500000 && tongtien < 1000000)
                kq = 10;
            if (tongtien >= 1000000 && tongtien < 2000000)
                kq = 25;
            if (tongtien >= 2000000 && tongtien < 3000000)
                kq = 40;
            if (tongtien >= 3000000 && tongtien < 4000000)
                kq = 55;
            if (tongtien >= 4000000 && tongtien < 5000000)
                kq = 70;
            if (tongtien >= 5000000 && tongtien < 6000000)
                kq = 90;
            if (tongtien >= 6000000)
                kq = 120;
            return kq;
        } 
    }
}
